package com.ruicar.afs.cloud.channel.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.channel.dto.RuleAtomDto;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @description: 请求渠道服务
 * @author: sijun.yu
 * @date: 2020/6/4 9:10
 */
@FeignClient(name = "channelApi", url = "${com.greatwall.services.channel-service.url}")
public interface ChannelApiFeign {

    @ApiOperation("查询挂靠公司列表")
    @PostMapping(value = "/caseChannel/getAffiliationInfo")
    IResponse getAffiliatedUnitsList(@RequestBody JSONObject json, @RequestHeader Map<String, String> headers);

    @ApiOperation("查询品牌列表")
    @PostMapping(value = "/vehicle/getBrandListByRule")
    IResponse getBrandListByRule(@RequestBody RuleAtomDto json, @RequestHeader Map<String, String> headers);

    @ApiOperation("查询车型列表")
    @PostMapping(value = "/vehicle/getModelListByRule")
    IResponse getModelListByRule(@RequestBody RuleAtomDto json, @RequestHeader Map<String, String> headers);

    @ApiOperation("查询款式列表")
    @PostMapping(value = "/vehicle/getStyleListByRule")
    IResponse getStyleListByRule(@RequestBody RuleAtomDto json, @RequestHeader Map<String, String> headers);


}
